package org.imlinker.status;

import javax.swing.ImageIcon;

import org.imlinker.account.ManageAccount;

/**
 *  
 * 
 */
public class StatusIcons extends Object {

	/**
	 * The icon of busy.
	 */
	private static ImageIcon busyIcon;

	/**
	 * The icon of away.
	 */
	private static ImageIcon awayIcon;

	/**
	 * The icon of online.
	 */
	private static ImageIcon onlineIcon;

	/**
	 * The icon of offline.
	 */
	private static ImageIcon offlineIcon;

	/**
	 * Get free icon.
	 * 
	 * @return The free icon.
	 */
	public static ImageIcon getFreeIcon() {
		if (onlineIcon == null) {
			String path = ManageAccount.getImagePath() + "free.png";
			onlineIcon = new ImageIcon(path);
		}

		return onlineIcon;
	}

	/**
	 * Get offline icon.
	 * 
	 * @return The icon to dipslay offline info.
	 */
	public static ImageIcon getOffIcon() {
		if (offlineIcon == null) {
			offlineIcon = new ImageIcon(ManageAccount.getImagePath()
					+ "off.png");
		}

		return offlineIcon;
	}

	/**
	 * Get away icon.
	 * 
	 * @return The away icon.
	 */
	public static ImageIcon getAwayIcon() {
		if (awayIcon == null) {
			awayIcon = new ImageIcon(ManageAccount.getImagePath() + "away.png");
		}

		return awayIcon;
	}

	/**
	 * Get busy icon.
	 * 
	 * @return the busy icon.
	 */
	public static ImageIcon getBusyIcon() {
		if (busyIcon == null) {
			busyIcon = new ImageIcon(ManageAccount.getImagePath() + "busy.png");
		}

		return busyIcon;
	}
}
